<?php

class RRestResult{
    
    public $result;
    public $http_code;
    public $content_type;
    public $data = null;
    
    public function __construct($result, $http_code, $content_type) {
        $this->result = $result;
        $this->http_code = $http_code;
        $this->content_type = $content_type;
        if ($content_type == "application/json; charset=utf-8"){
            $this->data = RJson::JSONToArray($this->result);
        }
    }
    
}